fix: use actual CPU idle% for adaptive throttling on macOS#835
fix: use actual CPU idle% for adaptive throttling on macOS#835marcusquinn merged 2 commits intomainfrom
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Tue Feb 10 00:07:05 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Tue Feb 10 00:11:34 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
…ling on macOS Load average on macOS includes processes in uninterruptible sleep (I/O wait, Backblaze backup, Spotlight indexing, etc.), causing load averages of 150+ on 10 cores even when actual CPU usage is only 65%. The adaptive throttler was using load_ratio = load_avg/cores*100, which caused it to over-throttle to 1-2 workers when there was 35%+ CPU idle. Now on macOS: uses `top -l 1` to get real CPU idle percentage. The throttle bands are recalibrated for 0-100% CPU usage: - CPU < 40%: scale up (double base concurrency) - CPU 40-70%: use base concurrency as-is - CPU 70-85%: halve concurrency - CPU > 85%: minimum floor (1 worker) Linux behavior unchanged (load average is more accurate there since it only counts runnable processes, not I/O-blocked ones).
65d75d7 to
541b077
Compare
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Tue Feb 10 01:34:37 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|



Summary
load_average / cpu_coresas its signal, which on macOS includes I/O-blocked processes (Backblaze, Spotlight, etc.). Load average of 155 on 10 cores = 1550% ratio, causing max throttle to 1-2 workers — even when actual CPU was only 65% used with 35% idle.top -l 1to get real CPU idle percentage (0-100%). Recalibrate throttle bands: <40% = scale up, 40-70% = base, 70-85% = halve, >85% = minimum.Testing
Verified
top -l 1 | awk '/CPU usage/ ...'returns accurate idle% (37% idle = 63% used) while load average simultaneously showed 155/10 cores. ShellCheck clean on changed lines.